import request from '@/utils/request'

export function addOrder(orderList, totalPrice) {
  return request({
    url: `/order/addOrder/${totalPrice}`,
    method: 'post',
    data: orderList
  })
}

export function pageOrder(page, size, userId) {
  return request({
    url: `/order/pageOrder/${page}/${size}/${userId}`,
    method: 'get'
  })
}

export function removeOrder(sn) {
  return request({
    url: `/order/removeOrder/${sn}`,
    method: 'get'
  })
}

export function paymentOrder(sn) {
  return request({
    url: `/order/paymentOrder/${sn}`,
    method: 'get'
  })
}

export function enterOrder(sn) {
  return request({
    url: `/order/enterOrder/${sn}`,
    method: 'get'
  })
}

export function returnAmountOrder(sn) {
  return request({
    url: `/order/returnAmountOrder/${sn}`,
    method: 'get'
  })
}
